package com.yuwei.module_visit.model

import com.bw.lib_common.entity.Res
import com.bw.lib_common.model.BaseRepository
import com.bw.lib_http.OkHttpClientManager
import com.yuwei.http.entity.AddVisitEntity
import com.yuwei.http.entity.VisitEntity
import com.yuwei.module_visit.api.VisitApiService
import retrofit2.create

class VisitRepository: BaseRepository<VisitApiService>() {
    override fun createApiServer(): VisitApiService = OkHttpClientManager.retrofitInstance.create(VisitApiService::class.java)
    suspend fun getVisitList() : Res<VisitEntity> = apiService.getVisitList()
    suspend fun addVisit(addVisitEntity: AddVisitEntity) : Res<AddVisitEntity> = apiService.addVisit(addVisitEntity)

}